﻿@model MVC4.Presentation.Models.forgotPassWordModel
 @{
     int status = (int)ViewBag.forgetPassWordStatus;
 }
 
<div id="forgot-box" class="item  forgot-box"   ng-class="{active: activePanel==3}" >
	<div class="widget-body">
		<div class="widget-main">
			<h4 class="header red lighter bigger">
				<i class="icon-key"></i>
				Retrieve Password
			</h4>

			<div class="space-6"></div>
			 <p>
				Enter your email and to receive instructions
			</p>

   @using (Html.BeginForm("ForgetPassWord", "Account", new { }, FormMethod.Post, new { name = "ForgetPassWordForm", novalidate = "" }))
   {
                @Html.AntiForgeryToken()
				<fieldset>
				   <div class="control-group "  ng-class="{error: (ForgetPassWordForm.Email.$error.required||ForgetPassWordForm.Email.$error.email) && forgotPasswordModel.send}"       >
                        @Html.LabelFor(m => m.Email, new { @class = "control-label" })  
					    <div class="controls">
						    <span class="span12 input-icon input-icon-right">
                                <input class="span12 "     id="Email" name="Email"  ng-model="forgotPasswordModel.Email" type="email" required />
							    <i      ng-class="{true:'icon-remove-sign',false:'icon-envelope'  }[(ForgetPassWordForm.Email.$error.required)&&forgotPasswordModel.send]" ></i>
						    </span>
						    <span class="help-inline" ng-show="(ForgetPassWordForm.Email.$error.required||ForgetPassWordForm.Email.$error.email)&&forgotPasswordModel.send">Something may have gone wrong   </span>
                        </div>
                   </div>
                    <div class="space-6"></div>
                    
					<div class="row-fluid">
                        <label class="span8">
					   </label>
						<button onclick="return false;" class="span8 offset2 btn btn-small btn-danger" ng-click="submit(ForgetPassWordForm,$event,'forgotPasswordModel')" >
							<i class="icon-lightbulb"></i>
							Send Me!
						</button>
					</div>
                    <div class="space-12"></div>
                    <br />
                    <br />
                    <br />
                   <div class="row-fluid">
                         <div class="alert "  ng-class="{true:'alert-error',false:'alert-info'  }[(!ForgetPassWordForm.$valid )&&forgotPasswordModel.send||@status==0]"
                              ng-show="(!ForgetPassWordForm.$valid )&&forgotPasswordModel.send||(@status<2&&ForgetPassWordForm.$pristine)">
					        <button type="button" class="close" data-dismiss="alert">
						        <i class="icon-remove"></i>
					        </button>
                             <p  ng-show="(!ForgetPassWordForm.$valid )"  >Change a few things up and try submitting again.</p>
                             <p ng-show="(@status<2&&ForgetPassWordForm.$pristine)"> @ViewBag.forgetPassWordMessage</p>
                              
					       
				       </div>
				    </div>
				</fieldset>
   }
		</div><!--/widget-main-->

		<div class="toolbar center carousel-caption">
			<a href="#" onclick="$('#zCarousel').carousel('next'); return false;" class="back-to-login-link">
				Back to login
				<i class="icon-arrow-right"></i>
			</a>
		</div>
	</div><!--/widget-body-->
</div><!--/forgot-box-->